//
//  LastSellRecodeTableViewCell.m
//  EasyToTesco2.0
//
//  Created by knew on 16/11/15.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "LastSellRecodeTableViewCell.h"

@implementation LastSellRecodeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addLastRecodeCell];
    }
    return self;
}

- (void)addLastRecodeCell {
    
    UILabel *label = [[UILabel alloc] init];
    label.text = @"快递公司：";
    label.font = [UIFont systemFontOfSize:17];
    [self.contentView addSubview:label];
    self.leftLabel = label;
    
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(15);
        make.width.mas_equalTo(self.width * 0.3);
        make.top.equalTo(self.contentView.mas_top);
        make.height.mas_equalTo(self.Height);
    }];
    
    UITextField *textField = [[UITextField alloc] init];
    textField.font = [UIFont systemFontOfSize:17];
    [self.contentView addSubview:textField];
    textField.borderStyle = UITextBorderStyleRoundedRect;
    self.secondTextField = textField;
    
    [textField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label.mas_right);
        make.right.equalTo(self.mas_right).offset(-15);
        make.centerY.equalTo(self.mas_centerY);
        make.height.mas_equalTo(30);
    }];
    
    UIButton *button = [[UIButton alloc] init];
    button.hidden = YES;
    self.firstButton = button;
    [self.contentView addSubview:button];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label.mas_right).offset(4);
        make.right.equalTo(self.mas_right).offset(15);
        make.centerY.equalTo(self.mas_centerY);
        make.height.mas_equalTo(30);
    }];
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
